const mqtt = require('mqtt')

// const client = mqtt.connect('mqtt://47.93.216.41:1883')
const client = mqtt.connect('mqtt://47.101.172.203:1883')

client.on('connect', function() {
    console.log('Connected')
    client.subscribe('BIRDS_GNSS1')
    client.subscribe('BIRDS_GNSS2')
    // client.subscribe('demo1')
})

client.on('message', function(topic, message) {
    console.log(`${topic}收到信息:  ${message.toString()}`)
})